# 创建库
add_library(mylib STATIC
    src/mylib.cpp
)

# 设置动态库版本 (可选)
set_target_properties(mylib PROPERTIES
    VERSION 1.0.0
    SOVERSION 1
)

# 包含目录
target_include_directories(mylib PUBLIC 
    ${CMAKE_CURRENT_SOURCE_DIR}/include
)

# 安装配置 (可选)
install(TARGETS mylib
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
)

install(DIRECTORY include/ DESTINATION include)
